<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@page isELIgnored="false" %>
<!DOCTYPE html>
<html>

	<head>
		<c:set var="title" value="认证中心" scope="request" />
		<jsp:include page="/head.jsp" />
	</head>

	<body>
		<c:import url="/header.do?full=1" />
		<div class="col-md-2">
			<c:import url="/left-menu.do" />
		</div>
		<div class="col-md-10 news-add">
			<ol class="breadcrumb">
				<li>
					<a href="user.html">认证中心</a>
				</li>
				<li class="active">认证中心</li>
				<li class="active">认证</li>
			</ol>

			<form class="form-inline form-search">
				<!--<div class="form-group">
					<select class="form-control" name="newsClassId">
						<option value="">全部类别</option>
						<option value="certificate/selectInfoStatus.do">已认证</option>
						<option value="">未认证</option>
						<option value="">成绩通过</option>
						<option value="">成绩未通过</option>
					</select>
				</div>
				<div class="form-group">
					<input name="key" class="form-control" type="text" placeholder="证书编号">
				</div>
				<button class="btn btn-primary">
				<i class="fa fa-search"></i>-->
				</button>
			</form>
			<form action="/certificate/updateEnd.do" name="form1" method="get" style="text-align: center; color:black">
				<table align="center" bgcolor=aliceblue>
					<h2>资质认证	</h2>
					<tr>
						<td>信息编号:</td>
						<td><input type="text" class="form-control" name="infoId" id="infoName" placeholder="请输入您的信息编号" value="${certificate.infoId}" readonly="readonly" /></td>

					</tr>
					<!--<tr>
						<td>证书编号:</td>
						<td><input type="text" class="form-control" name="infoCertificateId" id="infoCertificateId" placeholder="请输入您的证书编号" value="${certificate.infoCertificateId}" readonly="readonly" /></td>

					</tr>
					<tr>
						<td>证书类型编号:</td>
						<td><input type="text" class="form-control" name="infoCertificateTypeId" id="infoCertificateTypeId" placeholder="请输入您的真实姓名" value="${certificate.infoCertificateTypeId}" readonly="readonly" /></td>

					</tr>-->
					<tr>
						<td>姓名:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
						<td><input type="text" class="form-control" name="infoName"class="form-control" id="infoName" placeholder="请输入您的真实姓名" value="${certificate.infoName}" placeholder="请输入您的是否通过" readonly="readonly" /></td>

					</tr>

					<tr>
						<td>性别:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
						<!--<td><input type="radio" name="infoSex"  value='1' ${certificate.infoSex}?'checked' :'' /> 男
						<input type="radio" name="infoSex"  value='2' ${certificate.infoSex}?'' : 'checked' /> 女
						</td>-->
							<td> 男     <input type="radio" name="infoSex" value="${certificate.infoSex}" checked  readonly="readonly"/>    女
						<input type="radio" name="infoSex" value="${certificate.infoSex}"  readonly="readonly"/>
					</td>
					</tr>
					<!--<div class="form-group ">
						<label for="sex" class="col-sm-2  control-label">姓
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别:</label> <label class="radio-inline">
							&nbsp;&nbsp; <input type="radio" name="Sex" id="Sex" value="true" ${list.infoSex?'checked':''} >男
						</label> <label class="radio-inline"> 
						<input type="radio" name="Sex" id="Sex" value="false" ${list.infoSex?'':'checked'}>女
						</label> <span></span>

					</div>-->

					<tr>
						<td>身份证号:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
						<td><input type="text" name="infoCard"class="form-control" value="${certificate.infoCard} " placeholder="请输入您的身份证号" placeholder="请输入您的是否通过" readonly="readonly" /></td>
					</tr>

					<tr>
						<td>出生日期:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
						<%-- 	<td><input type="text" name="infoBirth" <fmt:formatDate value="${certificate.infoBirth}"pattern="yyyy-MM-dd "  placeholder="请输入您的是否通过" readonly="readonly"/></td> --%>
						<td class="form-control" readonly="readonly">
							<fmt:formatDate value="${certificate.infoBirth}" pattern="yyyy-MM-dd" />
							 <!--<input type="text" class="form-control"value="${certificate.infoBirth}" id="age"  name="age" placeholder="请输入您的出生日期" />-->
						</td>
					</tr>

					<tr>
						<td>手机号码:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
						<td><input type="tel" name="infoPhone"class="form-control" value="${certificate.infoPhone}" maxlength="11" placeholder="请输入您的手机号码" readonly="readonly" /></td>
					</tr>

					<tr>
						<td>家庭住址:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
						<td><input type="text" name="infoAddress" class="form-control"value="${certificate.infoAddress}" placeholder="请输入您的家庭住址" readonly="readonly" /></td>
					</tr>

					<!--<tr>
					<td>成绩:</td>
					<td><input type="text" name="select1"  placeholder="请输入您的成绩" /></td>
				</tr>-->
					<tr>
						<td>考生成绩：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
						<td><input type="text" name="infoGrade" class="form-control"value="${certificate.infoGrade}" placeholder="请输入考生成绩" /></td>
					</tr>
					<tr>
						<!--<td>是否通过:</td>
					<td><input type="text" name="infoPass" value="${certificate.infoPass}" placeholder="请输入您的是否通过" /></td>-->
						<td><label for="email">是否通过：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label></td>
						<td>
							<input type="text" name="infoPass"class="form-control" value="${certificate.infoPass}" placeholder="请输入您的是否通过" /></td>
						</td>
					</tr>
					<tr>
						<td>认证状态：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
						<td><input type="text" name="infoStatus"class="form-control" value="${certificate.infoStatus=='0'?'已认证':'未认证'}" placeholder="请输入认证状态" /></td>
					</tr>
					<tr>
						<td>认证评语:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
						<td><input type="text" name="infoRemark"class="form-control" value="${certificate.infoRemark}" placeholder="请输入您的评语" /></td>
					</tr>
					<tr>
						<td>考生用户名:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
						<td><input type="text" name="infoExamUsername"class="form-control" value="${certificate.infoExamUsername}" placeholder="请输入您的考生用户名" readonly="readonly" /></td>
					</tr>
					<tr>
						<td>认证师用户名:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
						<td><input type="text" name="infoRzsUsername"class="form-control" value="${certificate.infoRzsUsername}" placeholder="请输入您的认证师用户名" /></td>
					</tr>
					<tr>
						<td>报考金额:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
						<td><input type="text" name="infoMoney"class="form-control" value="${certificate.infoMoney}" placeholder="请输入您的报考金额" readonly="readonly" /></td>
					</tr>
					<tr class="form-group">
						<td>支付宝订单号:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
						<td><input type="text" name="infoZfbNumber" class="form-control" value="${certificate.infoZfbNumber}" placeholder="请输入您的支付宝订单号" readonly="readonly" /></td>
					</tr>
<br />
					<td><input type="submit" name="btn1"  class="btn btn-default" id="update" value="确认认证" /></td>
				</table>
			</form>

		</div>
		<jsp:include page="/footer.jsp" />	
		<!-- 	<script type="text/javascript" src="../news/js/news-search.js"></script>
		<script type="text/javascript" src="../news/js/news-class.js"></script> -->
	</body>
	<script type="text/javascript">
		window.onload = function() {
			var form = document.forms.form1;
			var select1 = form.infoGrade;
			var btn = form.btn1;
			btn.addEventListener("click", function() {
				if(select1.value == '0') {
					select1.setCustomValidity("请选择");
				} else {
					select1.setCustomValidity("");
				}
			});
			select1.addEventListener("change", function() {
				if(select1.value == '0') {
					form.infoStatus.value = '';
					form.infoPass.value = '';
					form.infoRzsUsername.value = '';
				} else {
					if(select1.value >= 60 && select1.value <= 100) {
						form.infoPass.value = '已通过';
						form.infoStatus.value = '已认证';
						form.infoRzsUsername.value = '${sessionScope.user.userRealName }';
					} else if(select1.value <= 60) {
						form.infoPass.value = '未通过';
						form.infoStatus.value = '已认证';
						form.infoRzsUsername.value = '${sessionScope.user.userRealName }';
					}
				}

			});
		}

		function changepic() {
			$("#prompt3").css("display", "none");
			var reads = new FileReader();
			f = document.getElementById('file').files[0];
			reads.readAsDataURL(f);
			reads.onload = function(e) {
				document.getElementById('img3').src = this.result;
				$("#img3").css("display", "block");
			};
		}
	</script>

</html>